package com.it.test.base;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public abstract class BaseTest {

    protected AnnotationConfigApplicationContext applicationContext;

    @BeforeEach
    public void before() {
        applicationContext = new AnnotationConfigApplicationContext("com.it");
    }

    @AfterEach
    public void after() {
        if (applicationContext != null) applicationContext.close();
    }

}
